package com.yima.baseproj.module.sys.teacher;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yima.baseproj.module.sys.teacher.model.TeacherSearchAddModel;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface TeacherMapper extends BaseMapper<TeacherEntity> {


    /**
     * 分页+模糊查询
     * @param page
     * @param searchVo
     * @return
     */
    Page<Map> findBySearchVo(
            @Param("page")Page page,
            @Param("searchVo") TeacherSearchAddModel searchVo);

    List<Map> findBySearchVo(
            @Param("searchVo") TeacherSearchAddModel searchVo);

    Page<Map> findByKgId(
            @Param("page")Page page,
            @Param("id") int id,
            @Param("searchVo") TeacherSearchAddModel searchVo);

    List<Map> findByKgId(
            @Param("id") int id,
            @Param("searchVo") TeacherSearchAddModel searchVo);

    TeacherSearchAddModel findById(
            @Param("id") int id
    );

    void updateTeacherClassById(
            @Param("t_id") int tid,
            @Param("addVo") TeacherSearchAddModel addVo);

    void insertTeacherClass(
            @Param("t_id") int tid,
            @Param("addVo") TeacherSearchAddModel addVo);
}
